<load target="js/faq_admin.js" />
<include target="header.html" />
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
	<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form action="./" method="post" ruleset="insertFaq" enctype="multipart/form-data" id="fo_insert_faq" class="x_form-horizontal">
	<input type="hidden" name="success_return_url" value="{getUrl('module', $module)}" />
	<input type="hidden" name="act" value="procFaqAdminInsertFaq" />
	<input type="hidden" name="page" value="{$page}" />
	<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
	<input cond="$logged_info->is_admin!='Y'" type="hidden" name="faq_name" value="{$module_info->mid}" />
	<div class="x_control-group" cond="$logged_info->is_admin=='Y'">
		<label class="x_control-label" for="faq_name">{$lang->mid}</label>
		<div class="x_controls">
			<input type="text" name="faq_name" id="faq_name" value="{$module_info->mid}" />
			<a href="#about_mid" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_mid" hidden>{$lang->about_mid}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="module_category_srl">{$lang->module_category}</label>
		<div class="x_controls">
			<select name="module_category_srl" id="module_category_srl">
				<option value="0">{$lang->notuse}</option>
				<option loop="$module_category => $key,$val" value="{$key}" selected="selected"|cond="$module_info->module_category_srl==$key">{$val->title}</option>
			</select>
			<a href="#about_module_category" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_module_category" hidden>{$lang->about_module_category}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="lang_browser_title">{$lang->browser_title}</label>
		<div class="x_controls">
			<input type="text" name="browser_title" id="browser_title" class="lang_code" value="{htmlspecialchars($module_info->browser_title)}" />
			<a href="#about_browser_title" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_browser_title" hidden>{$lang->about_browser_title}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="layout_srl">{$lang->layout}</label>
		<div class="x_controls">
			<select name="layout_srl" id="layout_srl">
				<option value="0">{$lang->notuse}</option>
				<option loop="$layout_list => $key, $val" value="{$val->layout_srl}" selected="selected"|cond="$module_info->layout_srl==$val->layout_srl">{$val->title}({$val->layout})</option>
			</select>
			<a href="#about_layout" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_layout" hidden>{$lang->about_layout}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="skin">{$lang->skin}</label>
		<div class="x_controls">
			<select name="skin" id="skin">
				<option loop="$skin_list => $key,$val" value="{$key}" selected="selected"|cond="$module_info->skin==$key">{$val->title}</option>
			</select>
			<a href="#about_skin" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_skin" hidden>{$lang->about_skin}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="use_mobile">{$lang->mobile_view}</label>
		<div class="x_controls">
			<label for="use_mobile" class="x_inline">
				<input type="checkbox" name="use_mobile" id="use_mobile" value="Y" checked="checked"|cond="$module_info->use_mobile == 'Y'" /> 
				{$lang->about_mobile_view}
			</label>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="mlayout_srl">{$lang->mobile_layout}</label>
		<div class="x_controls">
			<select name="mlayout_srl" id="mlayout_srl">
				<option value="0">{$lang->notuse}</option>
				<option loop="$mlayout_list => $key, $val" value="{$val->layout_srl}" selected="selected"|cond="$module_info->mlayout_srl== $val->layout_srl">{$val->title} ({$val->layout})</option>
			</select>
			<a href="#about_mobile_layout" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_mobile_layout" hidden>{$lang->about_layout}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="mskin">{$lang->mobile_skin}</label>
		<div class="x_controls">
			<select name="mskin" id="mskin">
				<option loop="$mskin_list=> $key, $val" value="{$key}" selected="selected"|cond="$module_info->mskin== $key || (!$module_info->skin && $key=='xe_faq')">{$val->title}</option>
			</select>
			<a href="#about_mobile_skin" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_mobile_skin" hidden>{$lang->about_skin}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="order_target">{$lang->order_target}</label>
		<div class="x_controls">
			<select name="order_target" id="order_target">
				<option loop="$order_target => $key,$val" value="{$key}" selected="selected"|cond="$module_info->order_target == $key">{$val}</option>
			</select>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="order_type">{$lang->order_type}</label>
		<div class="x_controls">
			<select name="order_type" id="order_type">
				<option value="asc" selected="selected"|cond="$module_info->order_type != 'desc'">{$lang->order_asc}(ex: 1, 2, 3)</option>
				<option value="desc" selected="selected"|cond="$module_info->order_type == 'desc'">{$lang->order_desc}(ex: 3, 2, 1)</option>
			</select>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="list_count">{$lang->list_count}</label>
		<div class="x_controls">
			<input type="number" name="list_count" id="list_count" value="{$module_info->list_count?$module_info->list_count:20}" />
			<a href="#about_list_count" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_list_count" hidden>{$lang->about_list_count}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="search_list_count">{$lang->search_list_count}</label>
		<div class="x_controls">
			<input type="number" name="search_list_count" id="search_list_count" value="{$module_info->search_list_count?$module_info->search_list_count:20}" />
			<a href="#about_search_list_count" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_search_list_count" hidden>{$lang->about_search_list_count}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="page_count">{$lang->page_count}</label>
		<div class="x_controls">
			<input type="number" name="page_count" id="page_count" value="{$module_info->page_count?$module_info->page_count:10}" />
			<a href="#about_page_count" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_page_count" hidden>{$lang->about_page_count}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="use_category">{$lang->use_category}</label>
		<div class="x_controls">
			<label for="use_category" class="x_inline">
				<input type="checkbox" name="use_category" id="use_category" value="Y" checked="checked"|cond="$module_info->use_category=='Y'" />
				{nl2br($lang->about_use_category)}
			</label>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="allow_keywords">{$lang->allow_keywords}</label>
		<div class="x_controls">
			<label for="allow_keywords" class="x_inline">
				<input type="checkbox" name="allow_keywords" id="allow_keywords" value="Y" checked="checked"|cond="$module_info->allow_keywords!='N'" />
				{nl2br($lang->about_allow_keywords)}
			</label>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="faq_keywords">{$lang->faq_keywords}</label>
		<div class="x_controls">
			<input type="text" name="faq_keywords" id="faq_keywords" value="{$module_info->faq_keywords?$module_info->faq_keywords:''}" />
			<a href="#about_faq_keywords" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_faq_keywords" hidden>{nl2br($lang->about_faq_keywords)}</p>
		</div>
	</div>
	<div class="x_control-group">
		<label class="x_control-label" for="description">{$lang->description}</label>
		<div class="x_controls">
			<textarea name="description" id="description" style="vertical-align:top">{htmlspecialchars($module_info->description)}</textarea>
			<a href="#about_description" class="x_icon-question-sign" data-toggle>{$lang->help}</a>
			<p class="x_help-block" id="about_description" hidden>{$lang->about_description}</p>
		</div>
	</div>
	<div class="btnArea">
		<a href="{getUrl('act','dispFaqAdminContent','module_srl','')}" class="x_btn x_pull-left">{$lang->cmd_back}</a>
		<span class="x_pull-right"><input type="submit" value="{$lang->cmd_registration}" class="x_btn x_btn-primary" /></span>
	</div>
</form>
